.class public Lcom/glympse/android/glympse/MapControl$LocationOverlay;
.super Lcom/google/android/maps/Overlay;
.source "MapControl.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/MapControl;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "LocationOverlay"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympse/MapControl;


# direct methods
.method protected constructor <init>(Lcom/glympse/android/glympse/MapControl;)V
    .locals 0
    .parameter

    .prologue
    .line 368
    iput-object p1, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    invoke-direct {p0}, Lcom/google/android/maps/Overlay;-><init>()V

    return-void
.end method

.method private DrawActiveDestinations(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/android/maps/Projection;Lcom/glympse/platform/GVector$Tickets;)V
    .locals 8
    .parameter "oCanvas"
    .parameter "oPaint"
    .parameter "oProjection"
    .parameter

    .prologue
    .line 772
    .local p4, listTickets:Lcom/glympse/platform/GVector$Tickets;,"Lcom/glympse/platform/GVector$Tickets;"
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v0

    .line 775
    .local v0, lCurrent:J
    invoke-virtual {p4}, Lcom/glympse/platform/GVector$Tickets;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-nez v4, :cond_1

    .line 785
    :cond_0
    return-void

    .line 775
    :cond_1
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/glympse/platform/common/Ticket;

    .line 778
    .local v2, oTicket:Lcom/glympse/platform/common/Ticket;
    iget-wide v4, v2, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    const-wide/32 v6, 0x36ee80

    add-long/2addr v4, v6

    cmp-long v4, v4, v0

    if-lez v4, :cond_0

    .line 783
    invoke-direct {p0, p1, p2, p3, v2}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawDestination(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/android/maps/Projection;Lcom/glympse/platform/common/Ticket;)V

    goto :goto_0
.end method

.method private DrawDestination(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/android/maps/Projection;Lcom/glympse/platform/common/Ticket;)V
    .locals 7
    .parameter "oCanvas"
    .parameter "oPaint"
    .parameter "oProjection"
    .parameter "oTicket"

    .prologue
    const-wide v4, 0x412e848000000000L

    .line 790
    if-eqz p4, :cond_0

    iget-object v0, p4, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-virtual {v0}, Lcom/glympse/platform/common/Place;->HasLocation()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 793
    new-instance v6, Landroid/graphics/Point;

    invoke-direct {v6}, Landroid/graphics/Point;-><init>()V

    .line 794
    .local v6, oPoint:Landroid/graphics/Point;
    new-instance v0, Lcom/google/android/maps/GeoPoint;

    iget-object v1, p4, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v1, v1, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    mul-double/2addr v1, v4

    double-to-int v1, v1

    iget-object v2, p4, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v2, v2, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    mul-double/2addr v2, v4

    double-to-int v2, v2

    invoke-direct {v0, v1, v2}, Lcom/google/android/maps/GeoPoint;-><init>(II)V

    invoke-interface {p3, v0, v6}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 796
    iget-object v0, p4, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-object v3, v0, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    iget v4, v6, Landroid/graphics/Point;->x:I

    iget v5, v6, Landroid/graphics/Point;->y:I

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    invoke-direct/range {v0 .. v5}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawDestination(Landroid/graphics/Canvas;Landroid/graphics/Paint;Ljava/lang/String;II)V

    .line 798
    .end local v6           #oPoint:Landroid/graphics/Point;
    :cond_0
    return-void
.end method

.method private DrawDestination(Landroid/graphics/Canvas;Landroid/graphics/Paint;Ljava/lang/String;II)V
    .locals 11
    .parameter "oCanvas"
    .parameter "oPaint"
    .parameter "strName"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 804
    const/4 v4, 0x0

    const/16 v5, 0xff

    const v6, 0x7f020064

    move-object v0, p0

    move-object v1, p1

    move v2, p4

    move/from16 v3, p5

    invoke-virtual/range {v0 .. v6}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawResource(Landroid/graphics/Canvas;IIFII)I

    move-result v10

    .line 807
    .local v10, nHeight:I
    sget-object v0, Lcom/glympse/android/glympse/MapControl$EViewMode;->MainMap:Lcom/glympse/android/glympse/MapControl$EViewMode;

    iget-object v1, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    iget-object v1, v1, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v0, v1, :cond_0

    invoke-static {p3}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 809
    div-int/lit8 v0, v10, 0x2

    const/high16 v1, 0x4000

    iget-object v2, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    iget v2, v2, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v1, v2

    float-to-int v1, v1

    add-int/2addr v0, v1

    sub-int v8, p5, v0

    .line 810
    .local v8, nBottom:I
    const v3, 0x7f020037

    const/4 v0, 0x0

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/graphics/Color;->rgb(III)I

    move-result v5

    const/16 v6, 0xd

    const/4 v9, 0x1

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v4, p3

    move v7, p4

    invoke-direct/range {v0 .. v9}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawTextBox(Landroid/graphics/Canvas;Landroid/graphics/Paint;ILjava/lang/String;IIIIZ)V

    .line 812
    .end local v8           #nBottom:I
    :cond_0
    return-void
.end method

.method private DrawDestinationPicker(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Landroid/graphics/Paint;)V
    .locals 6
    .parameter "oCanvas"
    .parameter "oMapView"
    .parameter "oPaint"

    .prologue
    .line 554
    const/4 v3, 0x0

    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getWidth()I

    move-result v0

    div-int/lit8 v4, v0, 0x2

    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getHeight()I

    move-result v0

    div-int/lit8 v5, v0, 0x2

    move-object v0, p0

    move-object v1, p1

    move-object v2, p3

    invoke-direct/range {v0 .. v5}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawDestination(Landroid/graphics/Canvas;Landroid/graphics/Paint;Ljava/lang/String;II)V

    .line 555
    return-void
.end method

.method private DrawMainMapOrSendGlympse(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Landroid/graphics/Paint;)V
    .locals 30
    .parameter "oCanvas"
    .parameter "oMapView"
    .parameter "oPaint"

    .prologue
    .line 560
    new-instance v27, Landroid/graphics/Point;

    invoke-direct/range {v27 .. v27}, Landroid/graphics/Point;-><init>()V

    .line 564
    .local v27, oPoint:Landroid/graphics/Point;
    sget-object v5, Lcom/glympse/android/glympse/MapControl$EViewMode;->SendGlympse:Lcom/glympse/android/glympse/MapControl$EViewMode;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v5, v6, :cond_8

    .line 565
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    invoke-virtual {v5}, Lcom/glympse/platform/common/UserList;->GetSelf()Lcom/glympse/platform/common/User;

    move-result-object v5

    move-object/from16 v29, v5

    .line 569
    .local v29, oUserFocus:Lcom/glympse/platform/common/User;
    :goto_0
    invoke-virtual/range {v29 .. v29}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v25

    .line 571
    .local v25, oLocPoint:Lcom/glympse/platform/common/LocPoint;
    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getProjection()Lcom/google/android/maps/Projection;

    move-result-object v8

    .line 575
    .local v8, oProjection:Lcom/google/android/maps/Projection;
    invoke-virtual/range {v25 .. v25}, Lcom/glympse/platform/common/LocPoint;->HasLocation()Z

    move-result v5

    if-eqz v5, :cond_1

    .line 578
    invoke-static/range {v25 .. v25}, Lcom/glympse/platform/LocManager;->LocPointToGeoPoint(Lcom/glympse/platform/common/LocPoint;)Lcom/google/android/maps/GeoPoint;

    move-result-object v5

    move-object v0, v8

    move-object v1, v5

    move-object/from16 v2, v27

    invoke-interface {v0, v1, v2}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 580
    const/high16 v5, 0x4190

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget v6, v6, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float v22, v5, v6

    .line 587
    .local v22, fltMin:F
    invoke-virtual/range {v25 .. v25}, Lcom/glympse/platform/common/LocPoint;->HasAccuracy()Z

    move-result v5

    if-eqz v5, :cond_9

    move-object/from16 v0, v25

    iget v0, v0, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    move v5, v0

    invoke-interface {v8, v5}, Lcom/google/android/maps/Projection;->metersToEquatorPixels(F)F

    move-result v5

    move/from16 v23, v5

    .line 588
    .local v23, fltRadius:F
    :goto_1
    cmpg-float v5, v23, v22

    if-gez v5, :cond_0

    .line 590
    move/from16 v23, v22

    .line 594
    :cond_0
    const/16 v5, 0x2d

    const/16 v6, 0x5a

    const/16 v7, 0x5a

    const/16 v9, 0xff

    move-object/from16 v0, p3

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v9

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 595
    sget-object v5, Landroid/graphics/Paint$Style;->FILL_AND_STROKE:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 596
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    int-to-float v5, v5

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v6, v0

    int-to-float v6, v6

    move-object/from16 v0, p1

    move v1, v5

    move v2, v6

    move/from16 v3, v23

    move-object/from16 v4, p3

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    .line 599
    const/high16 v5, 0x4020

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget v6, v6, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v5, v6

    move-object/from16 v0, p3

    move v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 600
    const/16 v5, 0xaf

    const/16 v6, 0x5a

    const/16 v7, 0x5a

    const/16 v9, 0xff

    move-object/from16 v0, p3

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v9

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 601
    sget-object v5, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 602
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    int-to-float v5, v5

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v6, v0

    int-to-float v6, v6

    move-object/from16 v0, p1

    move v1, v5

    move v2, v6

    move/from16 v3, v23

    move-object/from16 v4, p3

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    .line 612
    new-instance v26, Landroid/graphics/Path;

    invoke-direct/range {v26 .. v26}, Landroid/graphics/Path;-><init>()V

    .line 613
    .local v26, oPath:Landroid/graphics/Path;
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    int-to-float v5, v5

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v6, v0

    int-to-float v6, v6

    sget-object v7, Landroid/graphics/Path$Direction;->CW:Landroid/graphics/Path$Direction;

    move-object/from16 v0, v26

    move v1, v5

    move v2, v6

    move/from16 v3, v23

    move-object v4, v7

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Path;->addCircle(FFFLandroid/graphics/Path$Direction;)V

    .line 614
    new-instance v28, Landroid/graphics/Region;

    invoke-direct/range {v28 .. v28}, Landroid/graphics/Region;-><init>()V

    .line 615
    .local v28, oRegion:Landroid/graphics/Region;
    new-instance v5, Landroid/graphics/Region;

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getWidth()I

    move-result v9

    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getHeight()I

    move-result v10

    invoke-direct {v5, v6, v7, v9, v10}, Landroid/graphics/Region;-><init>(IIII)V

    move-object/from16 v0, v28

    move-object/from16 v1, v26

    move-object v2, v5

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Region;->setPath(Landroid/graphics/Path;Landroid/graphics/Region;)Z

    .line 616
    new-instance v5, Landroid/graphics/Region;

    const/high16 v6, 0x4040

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v7, v0

    iget v7, v7, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v6, v7

    float-to-int v6, v6

    const/high16 v7, 0x4080

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v9, v0

    iget v9, v9, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v7, v9

    float-to-int v7, v7

    .line 617
    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getWidth()I

    move-result v9

    int-to-float v9, v9

    const/high16 v10, 0x4040

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v11, v0

    iget v11, v11, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v10, v11

    sub-float/2addr v9, v10

    float-to-int v9, v9

    .line 618
    invoke-virtual/range {p2 .. p2}, Lcom/google/android/maps/MapView;->getHeight()I

    move-result v10

    int-to-float v10, v10

    const/high16 v11, 0x4040

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v12, v0

    iget v12, v12, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v11, v12

    sub-float/2addr v10, v11

    float-to-int v10, v10

    invoke-direct {v5, v6, v7, v9, v10}, Landroid/graphics/Region;-><init>(IIII)V

    sget-object v6, Landroid/graphics/Region$Op;->DIFFERENCE:Landroid/graphics/Region$Op;

    .line 616
    move-object/from16 v0, v28

    move-object v1, v5

    move-object v2, v6

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Region;->op(Landroid/graphics/Region;Landroid/graphics/Region$Op;)Z

    .line 621
    sget-object v5, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 622
    invoke-virtual/range {v28 .. v28}, Landroid/graphics/Region;->getBoundaryPath()Landroid/graphics/Path;

    move-result-object v5

    move-object/from16 v0, p1

    move-object v1, v5

    move-object/from16 v2, p3

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 625
    .end local v22           #fltMin:F
    .end local v23           #fltRadius:F
    .end local v26           #oPath:Landroid/graphics/Path;
    .end local v28           #oRegion:Landroid/graphics/Region;
    :cond_1
    sget-object v5, Lcom/glympse/android/glympse/MapControl$EViewMode;->MainMap:Lcom/glympse/android/glympse/MapControl$EViewMode;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v5, v6, :cond_3

    .line 628
    sget-object v5, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V

    .line 629
    sget-object v5, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    .line 630
    sget-object v5, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 631
    const/high16 v5, 0x40c0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget v6, v6, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v5, v6

    move-object/from16 v0, p3

    move v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 634
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v5, v5, Lcom/glympse/platform/common/UserList;->m_listUsers:Lcom/glympse/platform/GVector$Users;

    invoke-virtual {v5}, Lcom/glympse/platform/GVector$Users;->iterator()Ljava/util/Iterator;

    move-result-object v5

    .end local p2
    :cond_2
    :goto_2
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-nez v6, :cond_a

    .line 706
    :cond_3
    const/4 v5, 0x0

    move-object/from16 v0, p3

    move v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 707
    sget-object v5, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    move-object/from16 v0, p3

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 708
    const/4 v5, 0x0

    move-object/from16 v0, p3

    move v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setFakeBoldText(Z)V

    .line 710
    sget-object v5, Lcom/glympse/android/glympse/MapControl$EViewMode;->MainMap:Lcom/glympse/android/glympse/MapControl$EViewMode;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v5, v6, :cond_6

    .line 716
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v5, v5, Lcom/glympse/platform/common/UserList;->m_listUsers:Lcom/glympse/platform/GVector$Users;

    invoke-virtual {v5}, Lcom/glympse/platform/GVector$Users;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :cond_4
    :goto_3
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-nez v5, :cond_13

    .line 723
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v5, v5, Lcom/glympse/platform/common/UserList;->m_listUsers:Lcom/glympse/platform/GVector$Users;

    invoke-virtual {v5}, Lcom/glympse/platform/GVector$Users;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :cond_5
    :goto_4
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-nez v5, :cond_14

    .line 732
    :cond_6
    sget-object v5, Lcom/glympse/android/glympse/MapControl$EViewMode;->MainMap:Lcom/glympse/android/glympse/MapControl$EViewMode;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v5, v6, :cond_7

    .line 735
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v6, v5, Lcom/glympse/platform/common/UserList;->m_oActiveUser:Lcom/glympse/platform/common/User;

    .line 738
    .local v6, oUser:Lcom/glympse/platform/common/User;
    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v5

    if-eqz v5, :cond_15

    .line 740
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oSentTickets:Lcom/glympse/platform/common/SentTicketList;

    iget-object v5, v5, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move-object/from16 v2, p3

    move-object v3, v8

    move-object v4, v5

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawActiveDestinations(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/android/maps/Projection;Lcom/glympse/platform/GVector$Tickets;)V

    .line 751
    .end local v6           #oUser:Lcom/glympse/platform/common/User;
    :cond_7
    :goto_5
    invoke-virtual/range {v29 .. v29}, Lcom/glympse/platform/common/User;->HasLocation()Z

    move-result v5

    if-eqz v5, :cond_16

    .line 753
    const/4 v11, 0x1

    move-object/from16 v9, p0

    move-object/from16 v10, v29

    move-object v12, v8

    move-object/from16 v13, p1

    move-object/from16 v14, p3

    invoke-direct/range {v9 .. v14}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawUser(Lcom/glympse/platform/common/User;ZLcom/google/android/maps/Projection;Landroid/graphics/Canvas;Landroid/graphics/Paint;)V

    .line 767
    :goto_6
    return-void

    .line 566
    .end local v8           #oProjection:Lcom/google/android/maps/Projection;
    .end local v25           #oLocPoint:Lcom/glympse/platform/common/LocPoint;
    .end local v29           #oUserFocus:Lcom/glympse/platform/common/User;
    .restart local p2
    :cond_8
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    iget-object v5, v5, Lcom/glympse/platform/common/UserList;->m_oActiveUser:Lcom/glympse/platform/common/User;

    move-object/from16 v29, v5

    goto/16 :goto_0

    .restart local v8       #oProjection:Lcom/google/android/maps/Projection;
    .restart local v22       #fltMin:F
    .restart local v25       #oLocPoint:Lcom/glympse/platform/common/LocPoint;
    .restart local v29       #oUserFocus:Lcom/glympse/platform/common/User;
    :cond_9
    move/from16 v23, v22

    .line 587
    goto/16 :goto_1

    .line 634
    .end local v22           #fltMin:F
    .end local p2
    :cond_a
    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/glympse/platform/common/User;

    .line 636
    .restart local v6       #oUser:Lcom/glympse/platform/common/User;
    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v7

    if-eqz v7, :cond_d

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v7

    iget-object v7, v7, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    iget-object v7, v7, Lcom/glympse/platform/common/ServerPost;->m_oTrackLocal:Lcom/glympse/platform/common/Track;

    invoke-virtual {v7}, Lcom/glympse/platform/common/Track;->isEmpty()Z

    move-result v7

    if-nez v7, :cond_d

    const/4 v7, 0x1

    move/from16 v20, v7

    .line 637
    .local v20, fPathLocal:Z
    :goto_7
    iget-object v7, v6, Lcom/glympse/platform/common/User;->m_oTrackServer:Lcom/glympse/platform/common/Track;

    invoke-virtual {v7}, Lcom/glympse/platform/common/Track;->isEmpty()Z

    move-result v7

    if-eqz v7, :cond_e

    const/4 v7, 0x0

    move/from16 v21, v7

    .line 639
    .local v21, fPathServer:Z
    :goto_8
    if-eqz v20, :cond_c

    .line 641
    new-instance v26, Landroid/graphics/Path;

    invoke-direct/range {v26 .. v26}, Landroid/graphics/Path;-><init>()V

    .line 642
    .restart local v26       #oPath:Landroid/graphics/Path;
    const/16 v19, 0x1

    .line 645
    .local v19, fFirst:Z
    if-eqz v21, :cond_b

    .line 647
    iget-object v7, v6, Lcom/glympse/platform/common/User;->m_oTrackServer:Lcom/glympse/platform/common/Track;

    invoke-virtual {v7}, Lcom/glympse/platform/common/Track;->lastElement()Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Lcom/glympse/platform/common/Track$TrackLoc;

    move-object/from16 v0, p2

    iget-object v0, v0, Lcom/glympse/platform/common/Track$TrackLoc;->m_oLocPointE6:Lcom/glympse/platform/LocPointE6;

    move-object v7, v0

    move-object v0, v8

    move-object v1, v7

    move-object/from16 v2, v27

    invoke-interface {v0, v1, v2}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 648
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    int-to-float v7, v7

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v9, v0

    int-to-float v9, v9

    move-object/from16 v0, v26

    move v1, v7

    move v2, v9

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->moveTo(FF)V

    .line 649
    const/16 v19, 0x0

    .line 653
    :cond_b
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v7

    iget-object v7, v7, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    iget-object v7, v7, Lcom/glympse/platform/common/ServerPost;->m_oTrackLocal:Lcom/glympse/platform/common/Track;

    invoke-virtual {v7}, Lcom/glympse/platform/common/Track;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :goto_9
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v9

    if-nez v9, :cond_f

    .line 671
    const/16 v7, 0x64

    const/4 v9, 0x0

    const/16 v10, 0x5b

    const/16 v11, 0xb0

    move-object/from16 v0, p3

    move v1, v7

    move v2, v9

    move v3, v10

    move v4, v11

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 672
    move-object/from16 v0, p1

    move-object/from16 v1, v26

    move-object/from16 v2, p3

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 675
    .end local v19           #fFirst:Z
    .end local v26           #oPath:Landroid/graphics/Path;
    :cond_c
    if-eqz v21, :cond_2

    .line 677
    new-instance v26, Landroid/graphics/Path;

    invoke-direct/range {v26 .. v26}, Landroid/graphics/Path;-><init>()V

    .line 678
    .restart local v26       #oPath:Landroid/graphics/Path;
    const/16 v19, 0x1

    .line 681
    .restart local v19       #fFirst:Z
    iget-object v6, v6, Lcom/glympse/platform/common/User;->m_oTrackServer:Lcom/glympse/platform/common/Track;

    .end local v6           #oUser:Lcom/glympse/platform/common/User;
    invoke-virtual {v6}, Lcom/glympse/platform/common/Track;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :goto_a
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-nez v7, :cond_11

    .line 699
    const/16 v6, 0x8c

    const/4 v7, 0x0

    const/16 v9, 0x5b

    const/16 v10, 0xb0

    move-object/from16 v0, p3

    move v1, v6

    move v2, v7

    move v3, v9

    move v4, v10

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 700
    move-object/from16 v0, p1

    move-object/from16 v1, v26

    move-object/from16 v2, p3

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    goto/16 :goto_2

    .line 636
    .end local v19           #fFirst:Z
    .end local v20           #fPathLocal:Z
    .end local v21           #fPathServer:Z
    .end local v26           #oPath:Landroid/graphics/Path;
    .restart local v6       #oUser:Lcom/glympse/platform/common/User;
    :cond_d
    const/4 v7, 0x0

    move/from16 v20, v7

    goto/16 :goto_7

    .line 637
    .restart local v20       #fPathLocal:Z
    :cond_e
    const/4 v7, 0x1

    move/from16 v21, v7

    goto/16 :goto_8

    .line 653
    .restart local v19       #fFirst:Z
    .restart local v21       #fPathServer:Z
    .restart local v26       #oPath:Landroid/graphics/Path;
    :cond_f
    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v24

    check-cast v24, Lcom/glympse/platform/common/Track$TrackLoc;

    .line 656
    .local v24, oLoc:Lcom/glympse/platform/common/Track$TrackLoc;
    move-object/from16 v0, v24

    iget-object v0, v0, Lcom/glympse/platform/common/Track$TrackLoc;->m_oLocPointE6:Lcom/glympse/platform/LocPointE6;

    move-object v9, v0

    move-object v0, v8

    move-object v1, v9

    move-object/from16 v2, v27

    invoke-interface {v0, v1, v2}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 659
    if-eqz v19, :cond_10

    .line 661
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v9, v0

    int-to-float v9, v9

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v10, v0

    int-to-float v10, v10

    move-object/from16 v0, v26

    move v1, v9

    move v2, v10

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->moveTo(FF)V

    .line 662
    const/16 v19, 0x0

    goto/16 :goto_9

    .line 666
    :cond_10
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v9, v0

    int-to-float v9, v9

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v10, v0

    int-to-float v10, v10

    move-object/from16 v0, v26

    move v1, v9

    move v2, v10

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->lineTo(FF)V

    goto/16 :goto_9

    .line 681
    .end local v6           #oUser:Lcom/glympse/platform/common/User;
    .end local v24           #oLoc:Lcom/glympse/platform/common/Track$TrackLoc;
    :cond_11
    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v24

    check-cast v24, Lcom/glympse/platform/common/Track$TrackLoc;

    .line 684
    .restart local v24       #oLoc:Lcom/glympse/platform/common/Track$TrackLoc;
    move-object/from16 v0, v24

    iget-object v0, v0, Lcom/glympse/platform/common/Track$TrackLoc;->m_oLocPointE6:Lcom/glympse/platform/LocPointE6;

    move-object v7, v0

    move-object v0, v8

    move-object v1, v7

    move-object/from16 v2, v27

    invoke-interface {v0, v1, v2}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 687
    if-eqz v19, :cond_12

    .line 689
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    int-to-float v7, v7

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v9, v0

    int-to-float v9, v9

    move-object/from16 v0, v26

    move v1, v7

    move v2, v9

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->moveTo(FF)V

    .line 690
    const/16 v19, 0x0

    goto/16 :goto_a

    .line 694
    :cond_12
    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    int-to-float v7, v7

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v9, v0

    int-to-float v9, v9

    move-object/from16 v0, v26

    move v1, v7

    move v2, v9

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Path;->lineTo(FF)V

    goto/16 :goto_a

    .line 716
    .end local v19           #fFirst:Z
    .end local v20           #fPathLocal:Z
    .end local v21           #fPathServer:Z
    .end local v24           #oLoc:Lcom/glympse/platform/common/Track$TrackLoc;
    .end local v26           #oPath:Landroid/graphics/Path;
    :cond_13
    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/glympse/platform/common/User;

    .line 718
    .restart local v6       #oUser:Lcom/glympse/platform/common/User;
    move-object v0, v6

    move-object/from16 v1, v29

    if-eq v0, v1, :cond_4

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsOnline()Z

    move-result v5

    if-nez v5, :cond_4

    .line 720
    const/4 v7, 0x0

    move-object/from16 v5, p0

    move-object/from16 v9, p1

    move-object/from16 v10, p3

    invoke-direct/range {v5 .. v10}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawUser(Lcom/glympse/platform/common/User;ZLcom/google/android/maps/Projection;Landroid/graphics/Canvas;Landroid/graphics/Paint;)V

    goto/16 :goto_3

    .line 723
    .end local v6           #oUser:Lcom/glympse/platform/common/User;
    :cond_14
    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/glympse/platform/common/User;

    .line 725
    .restart local v6       #oUser:Lcom/glympse/platform/common/User;
    move-object v0, v6

    move-object/from16 v1, v29

    if-eq v0, v1, :cond_5

    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->IsOnline()Z

    move-result v5

    if-eqz v5, :cond_5

    .line 727
    const/4 v7, 0x0

    move-object/from16 v5, p0

    move-object/from16 v9, p1

    move-object/from16 v10, p3

    invoke-direct/range {v5 .. v10}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawUser(Lcom/glympse/platform/common/User;ZLcom/google/android/maps/Projection;Landroid/graphics/Canvas;Landroid/graphics/Paint;)V

    goto/16 :goto_4

    .line 747
    :cond_15
    invoke-virtual {v6}, Lcom/glympse/platform/common/User;->GetTicketWithLatestStartTime()Lcom/glympse/platform/common/Ticket;

    move-result-object v5

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move-object/from16 v2, p3

    move-object v3, v8

    move-object v4, v5

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawDestination(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/android/maps/Projection;Lcom/glympse/platform/common/Ticket;)V

    goto/16 :goto_5

    .line 758
    .end local v6           #oUser:Lcom/glympse/platform/common/User;
    :cond_16
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v5, v0

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getWidth()I

    move-result v5

    div-int/lit8 v5, v5, 0x2

    move v0, v5

    move-object/from16 v1, v27

    iput v0, v1, Landroid/graphics/Point;->x:I

    .line 759
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v5, v0

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getHeight()I

    move-result v5

    div-int/lit8 v5, v5, 0x2

    move v0, v5

    move-object/from16 v1, v27

    iput v0, v1, Landroid/graphics/Point;->y:I

    .line 762
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v5, v0

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual/range {v29 .. v29}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v6

    if-eqz v6, :cond_17

    sget-object v6, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v6}, Lcom/glympse/android/glympse/Glympse;->GetLocationText()I

    move-result v6

    :goto_b
    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v13

    .line 765
    .local v13, str:Ljava/lang/String;
    const v12, 0x7f0200b9

    const/16 v5, 0xff

    const/16 v6, 0xff

    const/16 v7, 0xff

    invoke-static {v5, v6, v7}, Landroid/graphics/Color;->rgb(III)I

    move-result v14

    const/16 v15, 0x10

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->x:I

    move/from16 v16, v0

    move-object/from16 v0, v27

    iget v0, v0, Landroid/graphics/Point;->y:I

    move/from16 v17, v0

    const/16 v18, 0x0

    move-object/from16 v9, p0

    move-object/from16 v10, p1

    move-object/from16 v11, p3

    invoke-direct/range {v9 .. v18}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawTextBox(Landroid/graphics/Canvas;Landroid/graphics/Paint;ILjava/lang/String;IIIIZ)V

    goto/16 :goto_6

    .line 762
    .end local v13           #str:Ljava/lang/String;
    :cond_17
    const v6, 0x7f0a0020

    goto :goto_b
.end method

.method private DrawTextBox(Landroid/graphics/Canvas;Landroid/graphics/Paint;ILjava/lang/String;IIIIZ)V
    .locals 18
    .parameter "oCanvas"
    .parameter "oPaint"
    .parameter "nRes"
    .parameter "strText"
    .parameter "nColor"
    .parameter "nTextSize"
    .parameter "x"
    .parameter "y"
    .parameter "fBottom"

    .prologue
    .line 817
    move/from16 v0, p6

    int-to-float v0, v0

    move v14, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v15, v0

    iget v15, v15, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float v5, v14, v15

    .line 820
    .local v5, fltTextHeight:F
    move-object/from16 v0, p2

    move/from16 v1, p5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 821
    const/4 v14, 0x1

    move-object/from16 v0, p2

    move v1, v14

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setSubpixelText(Z)V

    .line 822
    move-object/from16 v0, p2

    move v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 823
    move-object/from16 v0, p2

    move-object/from16 v1, p4

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v6

    .line 826
    .local v6, fltTextWidth:F
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v14, v0

    invoke-virtual {v14}, Lcom/glympse/android/glympse/MapControl;->getResources()Landroid/content/res/Resources;

    move-result-object v14

    move-object v0, v14

    move/from16 v1, p3

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v9

    check-cast v9, Landroid/graphics/drawable/NinePatchDrawable;

    .line 827
    .local v9, oDrawable:Landroid/graphics/drawable/NinePatchDrawable;
    new-instance v11, Landroid/graphics/Rect;

    const/4 v14, 0x0

    const/4 v15, 0x0

    const/16 v16, 0x0

    const/16 v17, 0x0

    move-object v0, v11

    move v1, v14

    move v2, v15

    move/from16 v3, v16

    move/from16 v4, v17

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 828
    .local v11, rcPadding:Landroid/graphics/Rect;
    invoke-virtual {v9, v11}, Landroid/graphics/drawable/NinePatchDrawable;->getPadding(Landroid/graphics/Rect;)Z

    .line 832
    iget v14, v11, Landroid/graphics/Rect;->top:I

    float-to-int v15, v5

    add-int/2addr v14, v15

    iget v15, v11, Landroid/graphics/Rect;->bottom:I

    add-int/2addr v14, v15

    const v15, 0x3f19999a

    mul-float/2addr v15, v5

    float-to-int v15, v15

    add-int v7, v14, v15

    .line 833
    .local v7, nHeight:I
    iget v14, v11, Landroid/graphics/Rect;->left:I

    float-to-int v15, v6

    add-int/2addr v14, v15

    iget v15, v11, Landroid/graphics/Rect;->right:I

    add-int/2addr v14, v15

    const v15, 0x3f4ccccd

    mul-float/2addr v15, v5

    float-to-int v15, v15

    add-int v8, v14, v15

    .line 836
    .local v8, nWidth:I
    if-eqz p9, :cond_0

    .line 838
    div-int/lit8 v14, v7, 0x2

    sub-int p8, p8, v14

    .line 842
    :cond_0
    invoke-virtual {v9}, Landroid/graphics/drawable/NinePatchDrawable;->copyBounds()Landroid/graphics/Rect;

    move-result-object v10

    .line 843
    .local v10, rcBounds:Landroid/graphics/Rect;
    div-int/lit8 v14, v8, 0x2

    sub-int v14, p7, v14

    div-int/lit8 v15, v7, 0x2

    sub-int v15, p8, v15

    .line 844
    div-int/lit8 v16, v8, 0x2

    add-int v16, v16, p7

    div-int/lit8 v17, v7, 0x2

    add-int v17, v17, p8

    .line 843
    move-object v0, v9

    move v1, v14

    move v2, v15

    move/from16 v3, v16

    move/from16 v4, v17

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/drawable/NinePatchDrawable;->setBounds(IIII)V

    .line 845
    move-object v0, v9

    move-object/from16 v1, p1

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/NinePatchDrawable;->draw(Landroid/graphics/Canvas;)V

    .line 846
    invoke-virtual {v9, v10}, Landroid/graphics/drawable/NinePatchDrawable;->setBounds(Landroid/graphics/Rect;)V

    .line 849
    iget v14, v11, Landroid/graphics/Rect;->left:I

    iget v15, v11, Landroid/graphics/Rect;->right:I

    sub-int/2addr v14, v15

    div-int/lit8 v14, v14, 0x2

    add-int v12, p7, v14

    .line 850
    .local v12, xCenter:I
    iget v14, v11, Landroid/graphics/Rect;->top:I

    iget v15, v11, Landroid/graphics/Rect;->bottom:I

    sub-int/2addr v14, v15

    div-int/lit8 v14, v14, 0x2

    add-int v13, p8, v14

    .line 853
    .local v13, yCenter:I
    int-to-float v14, v12

    const v15, 0x3eb33333

    mul-float/2addr v15, v5

    float-to-int v15, v15

    add-int/2addr v15, v13

    int-to-float v15, v15

    move-object/from16 v0, p1

    move-object/from16 v1, p4

    move v2, v14

    move v3, v15

    move-object/from16 v4, p2

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 854
    return-void
.end method

.method private DrawUser(Lcom/glympse/platform/common/User;ZLcom/google/android/maps/Projection;Landroid/graphics/Canvas;Landroid/graphics/Paint;)V
    .locals 22
    .parameter "oUser"
    .parameter "fActive"
    .parameter "oProjection"
    .parameter "oCanvas"
    .parameter "oPaint"

    .prologue
    .line 446
    invoke-virtual/range {p1 .. p1}, Lcom/glympse/platform/common/User;->GetLocPoint()Lcom/glympse/platform/common/LocPoint;

    move-result-object v17

    .line 449
    .local v17, oLocPoint:Lcom/glympse/platform/common/LocPoint;
    invoke-virtual/range {v17 .. v17}, Lcom/glympse/platform/common/LocPoint;->HasLocation()Z

    move-result v5

    if-eqz v5, :cond_1

    .line 452
    new-instance v18, Landroid/graphics/Point;

    invoke-direct/range {v18 .. v18}, Landroid/graphics/Point;-><init>()V

    .line 453
    .local v18, oPoint:Landroid/graphics/Point;
    invoke-static/range {v17 .. v17}, Lcom/glympse/platform/LocManager;->LocPointToGeoPoint(Lcom/glympse/platform/common/LocPoint;)Lcom/google/android/maps/GeoPoint;

    move-result-object v5

    move-object/from16 v0, p3

    move-object v1, v5

    move-object/from16 v2, v18

    invoke-interface {v0, v1, v2}, Lcom/google/android/maps/Projection;->toPixels(Lcom/google/android/maps/GeoPoint;Landroid/graphics/Point;)Landroid/graphics/Point;

    .line 456
    invoke-virtual/range {p1 .. p1}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v5

    if-eqz v5, :cond_3

    sget-object v5, Lcom/glympse/android/glympseservice/GlympseService;->ms_oThis:Lcom/glympse/android/glympseservice/GlympseService;

    invoke-virtual {v5}, Lcom/glympse/android/glympseservice/GlympseService;->IsNetworkError()Z

    move-result v5

    if-eqz v5, :cond_3

    .line 458
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v8, v0

    move-object/from16 v0, v17

    iget v0, v0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    move v9, v0

    const/16 v10, 0xff

    invoke-virtual/range {v17 .. v17}, Lcom/glympse/platform/common/LocPoint;->HasBearing()Z

    move-result v5

    if-eqz v5, :cond_2

    .line 459
    const v5, 0x7f020065

    move v11, v5

    :goto_0
    move-object/from16 v5, p0

    move-object/from16 v6, p4

    .line 458
    invoke-virtual/range {v5 .. v11}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawResource(Landroid/graphics/Canvas;IIFII)I

    .line 493
    :cond_0
    :goto_1
    sget-object v5, Lcom/glympse/android/glympse/MapControl$ELabelMode;->Avatar:Lcom/glympse/android/glympse/MapControl$ELabelMode;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eLabelMode:Lcom/glympse/android/glympse/MapControl$ELabelMode;

    if-ne v5, v6, :cond_9

    .line 496
    move-object/from16 v0, p1

    iget-object v0, v0, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    move-object v5, v0

    if-eqz v5, :cond_1

    move-object/from16 v0, p1

    iget-object v0, v0, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    move-object v5, v0

    iget-object v5, v5, Lcom/glympse/platform/GImage;->m_oDrawable:Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v5, :cond_1

    .line 499
    move-object/from16 v0, p1

    iget-object v0, v0, Lcom/glympse/platform/common/User;->m_oImageAvatar:Lcom/glympse/platform/GImage;

    move-object v5, v0

    move-object v0, v5

    iget-object v0, v0, Lcom/glympse/platform/GImage;->m_oDrawable:Landroid/graphics/drawable/BitmapDrawable;

    move-object/from16 v16, v0

    .line 501
    .local v16, oDrawable:Landroid/graphics/drawable/Drawable;
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v5, v0

    const/high16 v6, 0x4200

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v7, v0

    iget v7, v7, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v6, v7

    float-to-int v6, v6

    sub-int v21, v5, v6

    .line 503
    .local v21, yCenter:I
    const/high16 v5, 0x4170

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget v6, v6, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    mul-float/2addr v5, v6

    float-to-int v15, v5

    .line 506
    .local v15, nRadius:I
    sget-object v5, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p5

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 507
    const/16 v5, 0xff

    const/4 v6, 0x0

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object/from16 v0, p5

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 508
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    add-int/lit8 v6, v15, 0x1

    sub-int/2addr v5, v6

    int-to-float v6, v5

    add-int/lit8 v5, v15, 0x1

    sub-int v5, v21, v5

    int-to-float v7, v5

    .line 509
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    add-int/lit8 v8, v15, 0x1

    add-int/2addr v5, v8

    int-to-float v8, v5

    add-int/lit8 v5, v15, 0x1

    add-int v5, v5, v21

    int-to-float v9, v5

    move-object/from16 v5, p4

    move-object/from16 v10, p5

    .line 508
    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    .line 513
    invoke-virtual/range {v16 .. v16}, Landroid/graphics/drawable/Drawable;->copyBounds()Landroid/graphics/Rect;

    move-result-object v19

    .line 514
    .local v19, rcBounds:Landroid/graphics/Rect;
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    sub-int/2addr v5, v15

    sub-int v6, v21, v15

    .line 515
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    add-int/2addr v7, v15

    add-int v8, v21, v15

    .line 514
    move-object/from16 v0, v16

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 516
    move-object/from16 v0, v16

    move-object/from16 v1, p4

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 517
    move-object/from16 v0, v16

    move-object/from16 v1, v19

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V

    .line 549
    .end local v15           #nRadius:I
    .end local v16           #oDrawable:Landroid/graphics/drawable/Drawable;
    .end local v18           #oPoint:Landroid/graphics/Point;
    .end local v19           #rcBounds:Landroid/graphics/Rect;
    .end local v21           #yCenter:I
    :cond_1
    :goto_2
    return-void

    .line 459
    .restart local v18       #oPoint:Landroid/graphics/Point;
    :cond_2
    const v5, 0x7f020069

    move v11, v5

    goto/16 :goto_0

    .line 466
    :cond_3
    invoke-virtual/range {p1 .. p1}, Lcom/glympse/platform/common/User;->GetAlpha()I

    move-result v14

    .line 469
    .local v14, nAlpha:I
    if-gez v14, :cond_5

    .line 471
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v8, v0

    move-object/from16 v0, v17

    iget v0, v0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    move v9, v0

    const/16 v10, 0xff

    invoke-virtual/range {v17 .. v17}, Lcom/glympse/platform/common/LocPoint;->HasBearing()Z

    move-result v5

    if-eqz v5, :cond_4

    .line 472
    const v5, 0x7f020066

    move v11, v5

    :goto_3
    move-object/from16 v5, p0

    move-object/from16 v6, p4

    .line 471
    invoke-virtual/range {v5 .. v11}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawResource(Landroid/graphics/Canvas;IIFII)I

    goto/16 :goto_1

    .line 472
    :cond_4
    const v5, 0x7f02006a

    move v11, v5

    goto :goto_3

    .line 477
    :cond_5
    const/16 v5, 0xff

    if-ge v14, v5, :cond_6

    .line 479
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v8, v0

    move-object/from16 v0, v17

    iget v0, v0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    move v9, v0

    const/16 v10, 0xff

    invoke-virtual/range {v17 .. v17}, Lcom/glympse/platform/common/LocPoint;->HasBearing()Z

    move-result v5

    if-eqz v5, :cond_7

    .line 480
    const v5, 0x7f020068

    move v11, v5

    :goto_4
    move-object/from16 v5, p0

    move-object/from16 v6, p4

    .line 479
    invoke-virtual/range {v5 .. v11}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawResource(Landroid/graphics/Canvas;IIFII)I

    .line 484
    :cond_6
    if-lez v14, :cond_0

    .line 486
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v8, v0

    move-object/from16 v0, v17

    iget v0, v0, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    move v9, v0

    invoke-virtual/range {v17 .. v17}, Lcom/glympse/platform/common/LocPoint;->HasBearing()Z

    move-result v5

    if-eqz v5, :cond_8

    .line 487
    const v5, 0x7f020067

    move v11, v5

    :goto_5
    move-object/from16 v5, p0

    move-object/from16 v6, p4

    move v10, v14

    .line 486
    invoke-virtual/range {v5 .. v11}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawResource(Landroid/graphics/Canvas;IIFII)I

    goto/16 :goto_1

    .line 480
    :cond_7
    const v5, 0x7f02006c

    move v11, v5

    goto :goto_4

    .line 487
    :cond_8
    const v5, 0x7f02006b

    move v11, v5

    goto :goto_5

    .line 522
    .end local v14           #nAlpha:I
    :cond_9
    sget-object v5, Lcom/glympse/android/glympse/MapControl$ELabelMode;->Name:Lcom/glympse/android/glympse/MapControl$ELabelMode;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    move-object v6, v0

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eLabelMode:Lcom/glympse/android/glympse/MapControl$ELabelMode;

    if-ne v5, v6, :cond_1

    .line 525
    move-object/from16 v0, p1

    iget-object v0, v0, Lcom/glympse/platform/common/User;->m_strVisibleDisplayName:Ljava/lang/String;

    move-object v5, v0

    move-object/from16 v0, p5

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v13

    .line 526
    .local v13, fltWidth:F
    invoke-virtual/range {p5 .. p5}, Landroid/graphics/Paint;->getTextSize()F

    move-result v12

    .line 527
    .local v12, fltHeight:F
    new-instance v20, Landroid/graphics/RectF;

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v5, v0

    const/4 v6, 0x3

    sub-int/2addr v5, v6

    int-to-float v5, v5

    const/high16 v6, 0x4000

    div-float v6, v13, v6

    sub-float/2addr v5, v6

    .line 528
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v6, v0

    const/16 v7, 0x10

    sub-int/2addr v6, v7

    const/4 v7, 0x1

    sub-int/2addr v6, v7

    int-to-float v6, v6

    sub-float/2addr v6, v12

    .line 529
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v7, v0

    add-int/lit8 v7, v7, 0x3

    int-to-float v7, v7

    const/high16 v8, 0x4000

    div-float v8, v13, v8

    add-float/2addr v7, v8

    .line 530
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v8, v0

    const/16 v9, 0x10

    sub-int/2addr v8, v9

    add-int/lit8 v8, v8, 0x4

    int-to-float v8, v8

    .line 527
    move-object/from16 v0, v20

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v8

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 533
    .local v20, rcf:Landroid/graphics/RectF;
    sget-object v5, Landroid/graphics/Paint$Style;->FILL_AND_STROKE:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p5

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 534
    const/16 v5, 0xff

    const/16 v6, 0xff

    const/16 v7, 0x92

    const/4 v8, 0x0

    move-object/from16 v0, p5

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 535
    const/high16 v5, 0x4040

    const/high16 v6, 0x4040

    move-object/from16 v0, p4

    move-object/from16 v1, v20

    move v2, v5

    move v3, v6

    move-object/from16 v4, p5

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 538
    sget-object v5, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    move-object/from16 v0, p5

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 539
    const/16 v5, 0x7f

    const/4 v6, 0x0

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object/from16 v0, p5

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 540
    const/high16 v5, 0x4040

    const/high16 v6, 0x4040

    move-object/from16 v0, p4

    move-object/from16 v1, v20

    move v2, v5

    move v3, v6

    move-object/from16 v4, p5

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 545
    const/16 v5, 0xff

    const/4 v6, 0x0

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object/from16 v0, p5

    move v1, v5

    move v2, v6

    move v3, v7

    move v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 546
    move-object/from16 v0, p1

    iget-object v0, v0, Lcom/glympse/platform/common/User;->m_strVisibleDisplayName:Ljava/lang/String;

    move-object v5, v0

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->x:I

    move v6, v0

    int-to-float v6, v6

    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Point;->y:I

    move v7, v0

    const/16 v8, 0x10

    sub-int/2addr v7, v8

    int-to-float v7, v7

    move-object/from16 v0, p4

    move-object v1, v5

    move v2, v6

    move v3, v7

    move-object/from16 v4, p5

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    goto/16 :goto_2
.end method


# virtual methods
.method public DrawResource(Landroid/graphics/Canvas;IIFII)I
    .locals 9
    .parameter "oCanvas"
    .parameter "xCenter"
    .parameter "yCenter"
    .parameter "fltRotation"
    .parameter "nAlpha"
    .parameter "nResource"

    .prologue
    const/16 v8, 0xff

    .line 859
    if-gtz p5, :cond_0

    .line 861
    const/4 v5, 0x0

    .line 900
    :goto_0
    return v5

    .line 865
    :cond_0
    iget-object v5, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5, p6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 868
    .local v2, oDrawable:Landroid/graphics/drawable/Drawable;
    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v0

    .line 869
    .local v0, cx:I
    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v1

    .line 872
    .local v1, cy:I
    div-int/lit8 v5, v0, 0x2

    sub-int v3, p2, v5

    .line 873
    .local v3, x:I
    div-int/lit8 v5, v1, 0x2

    sub-int v4, p3, v5

    .line 874
    .local v4, y:I
    add-int v5, v3, v0

    add-int v6, v4, v1

    invoke-virtual {v2, v3, v4, v5, v6}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 877
    if-ge p5, v8, :cond_1

    .line 879
    invoke-virtual {v2, p5}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 883
    :cond_1
    const/4 v5, 0x0

    cmpl-float v5, v5, p4

    if-eqz v5, :cond_2

    invoke-static {p4}, Ljava/lang/Float;->isNaN(F)Z

    move-result v5

    if-eqz v5, :cond_4

    .line 885
    :cond_2
    invoke-virtual {v2, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 895
    :goto_1
    if-ge p5, v8, :cond_3

    .line 897
    invoke-virtual {v2, v8}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    :cond_3
    move v5, v1

    .line 900
    goto :goto_0

    .line 889
    :cond_4
    int-to-float v5, p2

    int-to-float v6, p3

    invoke-virtual {p1, p4, v5, v6}, Landroid/graphics/Canvas;->rotate(FFF)V

    .line 890
    invoke-virtual {v2, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 891
    neg-float v5, p4

    int-to-float v6, p2

    int-to-float v7, p3

    invoke-virtual {p1, v5, v6, v7}, Landroid/graphics/Canvas;->rotate(FFF)V

    goto :goto_1
.end method

.method public draw(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Z)V
    .locals 8
    .parameter "oCanvas"
    .parameter "oMapView"
    .parameter "fShadow"

    .prologue
    .line 376
    :try_start_0
    invoke-super {p0, p1, p2, p3}, Lcom/google/android/maps/Overlay;->draw(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Z)V

    .line 383
    sget-object v5, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    if-nez v5, :cond_1

    .line 385
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "MapControl.LocationOverlay.draw() - found a null Glympse.ms_oThis, Map: "

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 441
    :cond_0
    :goto_0
    return-void

    .line 393
    :cond_1
    if-nez p3, :cond_0

    .line 399
    new-instance v4, Landroid/graphics/Paint;

    invoke-direct {v4}, Landroid/graphics/Paint;-><init>()V

    .line 400
    .local v4, oPaint:Landroid/graphics/Paint;
    const/4 v5, 0x1

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 402
    sget-object v5, Lcom/glympse/android/glympse/MapControl$EViewMode;->DestinationPicker:Lcom/glympse/android/glympse/MapControl$EViewMode;

    iget-object v6, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v5, v6, :cond_2

    .line 404
    invoke-direct {p0, p1, p2, v4}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawDestinationPicker(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Landroid/graphics/Paint;)V

    .line 411
    :goto_1
    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getWidth()I

    move-result v0

    .line 412
    .local v0, cxView:I
    invoke-virtual {p2}, Lcom/google/android/maps/MapView;->getHeight()I

    move-result v1

    .line 415
    .local v1, cyView:I
    sget-object v5, Lcom/glympse/android/glympse/MapControl$EViewMode;->SendGlympse:Lcom/glympse/android/glympse/MapControl$EViewMode;

    iget-object v6, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    iget-object v6, v6, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v5, v6, :cond_3

    .line 417
    iget-object v5, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f020063

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 418
    .local v3, oDrawable:Landroid/graphics/drawable/Drawable;
    const/4 v5, 0x0

    const/4 v6, 0x0

    invoke-virtual {v3, v5, v6, v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 419
    invoke-virtual {v3, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 437
    .end local v0           #cxView:I
    .end local v1           #cyView:I
    .end local v3           #oDrawable:Landroid/graphics/drawable/Drawable;
    .end local v4           #oPaint:Landroid/graphics/Paint;
    :catch_0
    move-exception v5

    move-object v2, v5

    .line 439
    .local v2, e:Ljava/lang/Exception;
    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0

    .line 408
    .end local v2           #e:Ljava/lang/Exception;
    .restart local v4       #oPaint:Landroid/graphics/Paint;
    :cond_2
    :try_start_1
    invoke-direct {p0, p1, p2, v4}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->DrawMainMapOrSendGlympse(Landroid/graphics/Canvas;Lcom/google/android/maps/MapView;Landroid/graphics/Paint;)V

    goto :goto_1

    .line 425
    .restart local v0       #cxView:I
    .restart local v1       #cyView:I
    :cond_3
    iget-object v5, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f0200bb

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 426
    .restart local v3       #oDrawable:Landroid/graphics/drawable/Drawable;
    const/4 v5, 0x0

    const/4 v6, 0x0

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v7

    invoke-virtual {v3, v5, v6, v0, v7}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 427
    invoke-virtual {v3, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 429
    sget-object v5, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v6, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v6}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v6

    if-ne v5, v6, :cond_0

    sget-object v5, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v5, v5, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    if-eqz v5, :cond_0

    sget-object v5, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v5, v5, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    iget-boolean v5, v5, Lcom/glympse/android/glympse/ViewMap;->m_fAdVisible:Z

    if-eqz v5, :cond_0

    .line 431
    iget-object v5, p0, Lcom/glympse/android/glympse/MapControl$LocationOverlay;->this$0:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v5}, Lcom/glympse/android/glympse/MapControl;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f020006

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 432
    const/4 v5, 0x0

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v6

    sub-int v6, v1, v6

    invoke-virtual {v3, v5, v6, v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 433
    invoke-virtual {v3, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto/16 :goto_0
.end method
